/**
 * Copyright (C), 2015-2019, XXX有限公司
 * FileName: ObserverClient
 * Author:   zhouheng
 * Date:     2019/5/1 20:27
 * Description: 观察者模式客户端
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.zhouh.patterns.com.zhouh.action.observer;

/**
 * 〈一句话功能简述〉<br> 
 * 〈观察者模式客户端〉
 *
 * @author zhouheng
 * @create 2019/5/1
 * @since 1.0.0
 */
public class ObserverClient {
    public static void main(String[] args){
        AppleAttention appleAttention = new AppleAttention();
        CustomerObserver z3 = new CustomerObserver("张三");
        appleAttention.add(z3);

        CustomerObserver l4 = new CustomerObserver("李四");
        appleAttention.add(l4);

        CustomerObserver w5 = new CustomerObserver("李四");
        appleAttention.add(w5);

        CustomerObserver z6 = new CustomerObserver("李四");
        appleAttention.add(z6);
        appleAttention.delete(z6);

        appleAttention.perform();
    }

}